package com.jk.mindskip.interfaces;

import com.jk.mindskip.dto.TbAdmin;
import com.jk.mindskip.pojo.PagedResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface TbAdminServiceApi {

    /**
     * 查询用户信息
     * @return
     */
    @PostMapping(value = "/admin/findAdminList")
    public PagedResponse<TbAdmin> findAdminList(@RequestBody TbAdmin admin, @RequestParam(value = "pageNum") Integer pageNum, @RequestParam(value = "pageSize") Integer pageSize);

    /**
     * 用户新增
     * @param admin
     */
    @PostMapping(value = "/admin/addAdmin")
    public void addAdmin(@RequestBody TbAdmin admin);

    @GetMapping(value = "/admin/findTbAdminByUserName")
    public TbAdmin findTbAdminByUserName(@RequestParam(value = "username") String username);
}
